home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000824-20010305 / 000100_news@columbia.edu _Thu Oct 26 09:39:58 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
  3.     by monire.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id JAA21795
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Thu, 26 Oct 2000 09:39:57 -0400 (EDT)
  5. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  6.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id JAA25939
  7.     for <kermit.misc@watsun.cc.columbia.edu>; Thu, 26 Oct 2000 09:39:57 -0400 (EDT)
  8. Received: (from news@localhost)
  9.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id JAA28890
  10.     for kermit.misc@watsun.cc.columbia.edu; Thu, 26 Oct 2000 09:34:39 -0400 (EDT)
  11. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  12. From: fdc@columbia.edu (Frank da Cruz)
  13. Subject: Re: log of a kermit comunication
  14. Date: 26 Oct 2000 13:34:31 GMT
  15. Organization: Columbia University
  16. Message-ID: <8t9bt7$s6o$1@newsmaster.cc.columbia.edu>
  17. To: kermit.misc@columbia.edu
  18.  
  19. In article <Pine.LNX.3.96.1001025195005.17762B-100000@atlanta.i2.com.br>,
  20. Luiz Geraldo Silva Braz  <braz@i2.com.br> wrote:
  21. : ...
  22. :    unsigned short int CRC = crc16(concat(TL32,S32,T,D))
  23. :    
  24. :    C1 = (CRC shr 12) and $0F   (1st. character)  
  25. :    C2 = (CRC shr 6) and $3F    (2nd. character)
  26. :    C3 = CRC and $3f            (guess you)
  27. : Is it the method?
  28. Yes.  Here is some actual code:
  29.  
  30.     j = chk3(p+1,m);
  31.     p[i++] = tochar((j >> 12) & 017);
  32.     p[i++] = tochar((j >> 6) & 077);
  33.     p[i++] = tochar(j & 077);
  34.  
  35. tochar() just adds 32 to make it a printable character.
  36.  
  37. - Frank